#include "UMLBox.h"
#include "DiagramVisitor.h"

UMLBox::UMLBox(const QString& text)
:	UMLObject(text),
	_size(10, 5)
{
}

UMLBox* UMLBox::clone() const
{
	return new UMLBox(*this);
}

void UMLBox::accept(DiagramVisitor& dv)
{
	dv.visit(*this);

	// Don't notifyObservers(). If the visitor modifies us, that modification
	// will generate the notification.
}

QSize UMLBox::size() const
{
	return _size;
}

void UMLBox::setSize(const QSize& s)
{
	_size = s;

	notifyObservers();
}

